package chrono_views;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import chrono_controller.Controller;
import javax.swing.JDesktopPane;
import java.awt.SystemColor;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.border.TitledBorder;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.UIManager;
import javax.swing.JComboBox;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

import javax.swing.DefaultListModel;
import javax.swing.JTextField;
import javax.swing.JProgressBar;
import javax.swing.JInternalFrame;
import javax.swing.JTabbedPane;
import javax.swing.JRadioButton;
import javax.swing.JTextPane;
import javax.swing.JToggleButton;
import javax.swing.JTable;

public class CourseEnCoursIhmImpl extends JFrame {
	private Controller controller_;

	private JPanel conteneur_;
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_ToursRestants;
	private JTextField textField_TourPrecent;
	private JTextField textFieldClassement;
	private JTextField textField_nextCar;
	private JTextField textField_TempsEcoule;
	private JTextField textField_TempsRestant;
	private JTextField textField_Etat;
	private JTextField textField_10;
	private JTextField textField_11;
	private JTextField textField_12;
	private JTextField textField_13;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;
	private JTextField textField_6;

	private DefaultTableModel colHdrs ;

	private DefaultListModel listModel;

	private Component tableauTops_;
	private JButton btnTop;
	private JTextPane txtpnHeuredepart_;
	private JTextPane txtpnHeureactuelle;

	private TableModel tableTops_;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					CourseEnCoursIhmImpl frame = new CourseEnCoursIhmImpl();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public CourseEnCoursIhmImpl() {
		this.setSize(1008, 654);
		setResizable(false);
		setTitle("Tableau de bord de la course en cours");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1038, 654);

		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);

		JMenu mnFichier = new JMenu("Fichier");
		menuBar.add(mnFichier);

		JMenuItem mntmArreterCourse = new JMenuItem("Arreter Course");
		mnFichier.add(mntmArreterCourse);

		JMenuItem mntmNewMenuItem = new JMenuItem("Exit");
		mnFichier.add(mntmNewMenuItem);

		JMenu mnEdition = new JMenu("Edition");
		menuBar.add(mnEdition);

		JMenu mnAbout = new JMenu("About");
		menuBar.add(mnAbout);

		JMenuItem mntmHelp = new JMenuItem("Help !");
		mnAbout.add(mntmHelp);
		conteneur_ = new JPanel();
		conteneur_.setBackground(SystemColor.inactiveCaption);
		conteneur_.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(conteneur_);

		JDesktopPane desktopPane = new JDesktopPane();
		desktopPane.setBackground(SystemColor.inactiveCaption);


		GroupLayout gl_conteneur_ = new GroupLayout(conteneur_);
		gl_conteneur_.setHorizontalGroup(
				gl_conteneur_.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_conteneur_.createSequentialGroup()
						.addContainerGap()
						.addComponent(desktopPane, GroupLayout.PREFERRED_SIZE, 1062, GroupLayout.PREFERRED_SIZE)
						.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
				);
		gl_conteneur_.setVerticalGroup(
				gl_conteneur_.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_conteneur_.createSequentialGroup()
						.addComponent(desktopPane, GroupLayout.PREFERRED_SIZE, 624, GroupLayout.PREFERRED_SIZE)
						.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
				);

		final JButton btnBoutonEnregistrerTop = new JButton("Bouton TOP");



		final JPanel panelInfoCourse = new JPanel();
		panelInfoCourse.setBounds(10, 11, 260, 281);
		desktopPane.add(panelInfoCourse);
		panelInfoCourse.setBorder(new TitledBorder(null, "Infos course", TitledBorder.LEADING, TitledBorder.TOP, null, null));

		JButton btnDemarrerCourse = new JButton("Demarrer");
		btnDemarrerCourse.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});


		JLabel lblClassement = new JLabel("Classement");

		JLabel lblProchaineVoiture = new JLabel("Prochaine voiture");

		JLabel lblTempscoul = new JLabel("Temps écoulé");

		JLabel lblTempsRestant = new JLabel("Temps restant");

		textFieldClassement = new JTextField();
		textFieldClassement.setColumns(10);

		textField_nextCar = new JTextField();
		textField_nextCar.setColumns(10);

		textField_TempsEcoule = new JTextField();
		textField_TempsEcoule.setColumns(10);

		textField_TempsRestant = new JTextField();
		textField_TempsRestant.setColumns(10);

		JButton button = new JButton("Demarrer");

		JLabel label = new JLabel("Heure actuelle");

		JLabel label_1 = new JLabel("Heure de depart");

		btnTop = new JButton("Bouton TOP");


		JLabel label_4 = new JLabel("Classement");

		textField_6 = new JTextField();
		textField_6.setColumns(10);

		JLabel label_2 = new JLabel("Prochaine voiture");

		textField_5 = new JTextField();
		textField_5.setColumns(10);

		textField_4 = new JTextField();
		textField_4.setColumns(10);

		JLabel label_3 = new JLabel("Temps écoulé");

		textField_3 = new JTextField();
		textField_3.setColumns(10);

		JLabel label_5 = new JLabel("Temps restant");

		txtpnHeureactuelle = new JTextPane();
		txtpnHeureactuelle.setText("HeureActuelle");

		txtpnHeuredepart_ = new JTextPane();
		txtpnHeuredepart_.setText("HeureDepart");
		GroupLayout gl_panelInfoCourse = new GroupLayout(panelInfoCourse);
		gl_panelInfoCourse.setHorizontalGroup(
				gl_panelInfoCourse.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panelInfoCourse.createSequentialGroup()
						.addComponent(btnDemarrerCourse)
						.addContainerGap(171, Short.MAX_VALUE))
						.addGroup(gl_panelInfoCourse.createSequentialGroup()
								.addContainerGap(186, Short.MAX_VALUE)
								.addComponent(btnBoutonEnregistrerTop, GroupLayout.PREFERRED_SIZE, 244, GroupLayout.PREFERRED_SIZE)
								.addGap(38))
								.addGroup(gl_panelInfoCourse.createSequentialGroup()
										.addContainerGap()
										.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.TRAILING)
												.addComponent(lblProchaineVoiture, GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)
												.addComponent(lblTempscoul, GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)
												.addGroup(gl_panelInfoCourse.createSequentialGroup()
														.addComponent(lblClassement)
														.addGap(32))
														.addComponent(lblTempsRestant))
														.addGap(275)
														.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.LEADING)
																.addComponent(textField_TempsRestant, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																.addComponent(textField_TempsEcoule, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																.addComponent(textField_nextCar, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																.addComponent(textFieldClassement, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
																.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
																.addGroup(gl_panelInfoCourse.createSequentialGroup()
																		.addGap(89)
																		.addComponent(button)
																		.addContainerGap(302, Short.MAX_VALUE))
																		.addGroup(gl_panelInfoCourse.createSequentialGroup()
																				.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.LEADING, false)
																						.addGroup(gl_panelInfoCourse.createSequentialGroup()
																								.addComponent(label_4)
																								.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
																								.addComponent(textField_6, GroupLayout.PREFERRED_SIZE, 124, GroupLayout.PREFERRED_SIZE))
																								.addComponent(btnTop, GroupLayout.PREFERRED_SIZE, 245, GroupLayout.PREFERRED_SIZE)
																								.addGroup(gl_panelInfoCourse.createSequentialGroup()
																										.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.LEADING)
																												.addComponent(label_2, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE)
																												.addComponent(label_3, GroupLayout.PREFERRED_SIZE, 105, GroupLayout.PREFERRED_SIZE)
																												.addComponent(label_5))
																												.addGap(18)
																												.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.LEADING)
																														.addComponent(textField_5, GroupLayout.PREFERRED_SIZE, 124, GroupLayout.PREFERRED_SIZE)
																														.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.TRAILING)
																																.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, 122, GroupLayout.PREFERRED_SIZE)
																																.addComponent(textField_4, GroupLayout.PREFERRED_SIZE, 123, GroupLayout.PREFERRED_SIZE)))))
																																.addContainerGap())
																																.addGroup(gl_panelInfoCourse.createSequentialGroup()
																																		.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.LEADING)
																																				.addComponent(label)
																																				.addComponent(txtpnHeureactuelle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
																																				.addGap(89)
																																				.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.LEADING)
																																						.addComponent(label_1)
																																						.addComponent(txtpnHeuredepart_, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
																																						.addGap(227))
				);
		gl_panelInfoCourse.setVerticalGroup(
				gl_panelInfoCourse.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panelInfoCourse.createSequentialGroup()
						.addComponent(button)
						.addGap(5)
						.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
								.addComponent(label)
								.addComponent(label_1))
								.addPreferredGap(ComponentPlacement.RELATED)
								.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.TRAILING)
										.addComponent(txtpnHeureactuelle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
										.addComponent(txtpnHeuredepart_, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
										.addGap(18)
										.addComponent(btnTop)
										.addPreferredGap(ComponentPlacement.UNRELATED)
										.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
												.addComponent(label_4)
												.addComponent(textField_6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
												.addGap(18)
												.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
														.addComponent(label_2)
														.addComponent(textField_5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
														.addPreferredGap(ComponentPlacement.UNRELATED)
														.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
																.addComponent(label_3)
																.addComponent(textField_4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
																.addGap(18)
																.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
																		.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																		.addComponent(label_5))
																		.addGap(68)
																		.addComponent(btnDemarrerCourse)
																		.addPreferredGap(ComponentPlacement.RELATED)
																		.addComponent(btnBoutonEnregistrerTop)
																		.addGap(25)
																		.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
																				.addComponent(textFieldClassement, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																				.addComponent(lblClassement))
																				.addGap(4)
																				.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
																						.addComponent(textField_nextCar, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																						.addComponent(lblProchaineVoiture))
																						.addPreferredGap(ComponentPlacement.RELATED)
																						.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
																								.addComponent(textField_TempsEcoule, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																								.addComponent(lblTempscoul))
																								.addPreferredGap(ComponentPlacement.RELATED)
																								.addGroup(gl_panelInfoCourse.createParallelGroup(Alignment.BASELINE)
																										.addComponent(lblTempsRestant)
																										.addComponent(textField_TempsRestant, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
																										.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
				);
		panelInfoCourse.setLayout(gl_panelInfoCourse);

		JTabbedPane tabbedPaneVoitures_ = new JTabbedPane(JTabbedPane.TOP);
		tabbedPaneVoitures_.setBounds(299, 21, 709, 269);
		desktopPane.add(tabbedPaneVoitures_);





		JPanel panelInfoVoiture_ = new JPanel();
		tabbedPaneVoitures_.addTab("New tab", null, panelInfoVoiture_, null);
		panelInfoVoiture_.setBorder(new TitledBorder(null, "Infos voiture", TitledBorder.LEADING, TitledBorder.TOP, null, null));

		JLabel lblProgressionTour = new JLabel("Progression / tour");

		JLabel lblToursParRelais = new JLabel("Tours par relais");

		JLabel lblNewLabel = new JLabel("Tours effectués");

		JLabel lblToursRestants = new JLabel("Tours restants ");

		JLabel lblTempsTourPrecdent = new JLabel("Temps tour precédent");

		JLabel lblEtat = new JLabel("Etat");

		JProgressBar progressBar = new JProgressBar();

		textField_1 = new JTextField();
		textField_1.setColumns(10);

		textField_2 = new JTextField();
		textField_2.setColumns(10);

		textField_ToursRestants = new JTextField();
		textField_ToursRestants.setColumns(10);

		textField_TourPrecent = new JTextField();
		textField_TourPrecent.setColumns(10);

		textField_Etat = new JTextField();
		textField_Etat.setColumns(10);

		JPanel panel_2 = new JPanel();
		panel_2.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Details pilotes", TitledBorder.LEADING, TitledBorder.TOP, null, null));

		JLabel lblListeDesPilotes = new JLabel("Liste des pilotes");

		JComboBox comboBoxListePilotes = new JComboBox();
		comboBoxListePilotes.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});

		JLabel lblPiloteActuel = new JLabel("Pilote actuel");

		textField = new JTextField();
		textField.setColumns(10);

		JLabel lblNombreDeTous = new JLabel("Nombre de tous consecutifs");

		textField_10 = new JTextField();
		textField_10.setColumns(10);

		JLabel lblNombreDeTours = new JLabel("Nombre de tours total");

		textField_11 = new JTextField();
		textField_11.setColumns(10);

		JLabel lblTempsDeConduite = new JLabel("Temps de conduite consécutif");

		textField_12 = new JTextField();
		textField_12.setColumns(10);

		JLabel lblTempsDeConduite_1 = new JLabel("Temps de conduite total");

		textField_13 = new JTextField();
		textField_13.setColumns(10);
		GroupLayout gl_panel_2 = new GroupLayout(panel_2);
		gl_panel_2.setHorizontalGroup(
				gl_panel_2.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_2.createSequentialGroup()
						.addContainerGap()
						.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)
								.addGroup(gl_panel_2.createParallelGroup(Alignment.TRAILING)
										.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)
												.addGroup(gl_panel_2.createSequentialGroup()
														.addGap(5)
														.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)
																.addComponent(lblListeDesPilotes)
																.addComponent(lblNombreDeTours)
																.addComponent(lblPiloteActuel, GroupLayout.PREFERRED_SIZE, 84, GroupLayout.PREFERRED_SIZE))
																.addGap(32))
																.addComponent(lblTempsDeConduite_1))
																.addGroup(gl_panel_2.createSequentialGroup()
																		.addComponent(lblNombreDeTous)
																		.addPreferredGap(ComponentPlacement.RELATED)))
																		.addComponent(lblTempsDeConduite))
																		.addGap(10)
																		.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)
																				.addComponent(textField_13, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
																				.addComponent(comboBoxListePilotes, Alignment.TRAILING, 0, 195, Short.MAX_VALUE)
																				.addComponent(textField, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
																				.addComponent(textField_10, GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
																				.addComponent(textField_11, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
																				.addComponent(textField_12, GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE))
																				.addContainerGap())
				);
		gl_panel_2.setVerticalGroup(
				gl_panel_2.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_2.createSequentialGroup()
						.addContainerGap()
						.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)
								.addComponent(lblListeDesPilotes)
								.addComponent(comboBoxListePilotes, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
								.addGap(18)
								.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)
										.addComponent(lblPiloteActuel)
										.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
										.addPreferredGap(ComponentPlacement.UNRELATED)
										.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)
												.addComponent(lblNombreDeTous)
												.addComponent(textField_10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
												.addPreferredGap(ComponentPlacement.UNRELATED)
												.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)
														.addComponent(lblNombreDeTours)
														.addComponent(textField_11, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
														.addGap(9)
														.addGroup(gl_panel_2.createParallelGroup(Alignment.TRAILING)
																.addComponent(lblTempsDeConduite)
																.addComponent(textField_12, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
																.addPreferredGap(ComponentPlacement.UNRELATED)
																.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)
																		.addComponent(lblTempsDeConduite_1)
																		.addComponent(textField_13, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
				);
		panel_2.setLayout(gl_panel_2);
		GroupLayout gl_panelInfoVoiture_ = new GroupLayout(panelInfoVoiture_);
		gl_panelInfoVoiture_.setHorizontalGroup(
				gl_panelInfoVoiture_.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
						.addGroup(gl_panelInfoVoiture_.createParallelGroup(Alignment.LEADING)
								.addComponent(lblProgressionTour, GroupLayout.PREFERRED_SIZE, 102, GroupLayout.PREFERRED_SIZE)
								.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
										.addGap(10)
										.addComponent(lblToursParRelais))
										.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
												.addGap(10)
												.addComponent(lblNewLabel))
												.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
														.addGap(10)
														.addComponent(lblToursRestants))
														.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
																.addGap(10)
																.addComponent(lblTempsTourPrecdent))
																.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
																		.addGap(10)
																		.addComponent(lblEtat)))
																		.addGap(10)
																		.addGroup(gl_panelInfoVoiture_.createParallelGroup(Alignment.LEADING)
																				.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																				.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																				.addComponent(textField_ToursRestants, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																				.addComponent(textField_TourPrecent, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																				.addComponent(textField_Etat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
																				.addComponent(progressBar, GroupLayout.PREFERRED_SIZE, 176, GroupLayout.PREFERRED_SIZE))
																				.addGap(18)
																				.addComponent(panel_2, GroupLayout.PREFERRED_SIZE, 368, GroupLayout.PREFERRED_SIZE)
																				.addGap(24))
				);
		gl_panelInfoVoiture_.setVerticalGroup(
				gl_panelInfoVoiture_.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
						.addGroup(gl_panelInfoVoiture_.createParallelGroup(Alignment.LEADING)
								.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
										.addGap(11)
										.addComponent(lblProgressionTour)
										.addGap(29)
										.addComponent(lblToursParRelais)
										.addGap(17)
										.addComponent(lblNewLabel)
										.addGap(17)
										.addComponent(lblToursRestants)
										.addGap(17)
										.addComponent(lblTempsTourPrecdent)
										.addGap(17)
										.addComponent(lblEtat))
										.addGroup(gl_panelInfoVoiture_.createSequentialGroup()
												.addContainerGap()
												.addComponent(progressBar, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
												.addGap(26)
												.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
												.addGap(11)
												.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
												.addGap(11)
												.addComponent(textField_ToursRestants, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
												.addGap(11)
												.addComponent(textField_TourPrecent, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
												.addGap(11)
												.addComponent(textField_Etat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
												.addComponent(panel_2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
												.addContainerGap())
				);
		panelInfoVoiture_.setLayout(gl_panelInfoVoiture_);

		final JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(-7, 303, 813, 254);
		desktopPane.add(tabbedPane);
		
		JScrollPane scrollPaneV3 = new JScrollPane();
		tabbedPane.addTab("New tab", null, scrollPaneV3, null);
		
		final JToggleButton toggleButton3 = new JToggleButton("New toggle button");
		scrollPaneV3.setViewportView(toggleButton3);
		//final JTable table = new JTable(1,7);
		//tglbtnTooglebtntop.add(table);

		final JToggleButton tglbtnNewToggleButton = new JToggleButton("New toggle button");
		tabbedPane.addTab("New tab", null, tglbtnNewToggleButton, null);



		final	DefaultTableModel  model = new 	DefaultTableModel(1, 7);



		btnTop.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {


				JTable tab = new  JTable(1,7);

				model.addRow((new String[]{"Ceci est un Test"}));
				toggleButton3.add(tab);

				tab.setModel(model);



			}
		});





		conteneur_.setLayout(gl_conteneur_);
	}
}
